package com.jeesite.modules.conf;

import java.io.File;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import com.jeesite.common.io.FileUtils;

import lombok.Data;
/**
 * 读取配置文件
 * @author EDZ
 *
 */
@Data
@Component
@ConfigurationProperties(prefix="httpserver")
public class ConfigData {
     private String url;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
    public static void main(String[] args) {
		String url="http://localhost:8980/knowing/userfiles/fileupload/202004/1246282137354309634.mp4";
		url=url.replace("http://localhost:8980/knowing", "");
		System.out.println(url);
		File file = FileUtils.getFile(url);
		boolean exists = file.exists();
		System.out.println(exists);
	}
}
